package com.chianghao.core.generator;

import freemarker.template.Configuration;
import freemarker.template.TemplateExceptionHandler;

public class FreeMarkerConfig {

    private final static Configuration configuration ;

    static {
        configuration = new Configuration(Configuration.VERSION_2_3_23);
        configuration.setClassLoaderForTemplateLoading(FreeMarkerConfig.class.getClassLoader(),"chianghao/core/generator/template");
        configuration.setDefaultEncoding("UTF-8");
        configuration.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);
    }

    public static Configuration get(){
        return configuration;
    }




}
